package cn.jdy.authority.entity;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.List;

/**
 * 组织机构单位的基本信息类 组织机构信息实体类
 * 本实体主要包括机构标识、机构名称、上级机构标识、机构类型等属性。
 *
 * @author: Wuzhiliang
 * @date: 2013-08-05 15:21
 */
@Entity
public class Organ implements Serializable {

	private static final long serialVersionUID = 1L;

	@Id // 设置为主键
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid.hex")
	@Column(length = 32)
	private String id; //	    本实体记录的唯一标识
	private String pid; //	   直属上级机构编码。',
	private String porganame; //直属上级机构单位详细的名称。',
	private String organame; //机构单位详细的名称。',
	private Integer sort;//	  '在同级中的排列顺序的序号，用自然数阿拉伯数字标识，如，1、2、3。',
	private String isactive;//	 '描述该机构是否有效的一个状态标识  0 无效  1 有效',
	private String remark; //	   备注

	@Transient
	private List<Organ> children;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getPid() {
		return pid;
	}

	public void setPid(String pid) {
		this.pid = pid;
	}

	public Integer getSort() {
		return sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}

	public String getIsactive() {
		return isactive;
	}

	public void setIsactive(String isactive) {
		this.isactive = isactive;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public List<Organ> getChildren() {
		return children;
	}

	public void setChildren(List<Organ> children) {
		this.children = children;
	}

	public String getPorganame() {
		return porganame;
	}

	public void setPorganame(String porganame) {
		this.porganame = porganame;
	}

	public String getOrganame() {
		return organame;
	}

	public void setOrganame(String organame) {
		this.organame = organame;
	}

}
